package com.book.dao;

import com.book.entity.Student;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface StudentMapper {

    // 查询学生列表
    @Select("select * from students;")
    List<Student> listStudents();

    // 统计学生数量
    @Select("select count(*) from students;")
    Integer countStudents();

    // 查询学生
    @Select("select * from students where id=#{id}")
    Student getById(Integer id);
}
